package com.tjise.demo.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @program: tjise_parent
 * @description: asd
 * @author: 郑朝文
 * @create: 2021-06-23 09:42
 **/
public class ExcelListener extends AnalysisEventListener<DemoData> {
    /**
     * 一行一行的读取文件中的内容
     * @param demoData
     * @param analysisContext
     */
    @Override
    public void invoke(DemoData demoData, AnalysisContext analysisContext) {
        System.out.println("___________________>"+demoData);

    }

    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头："+headMap);
    }


    /**
     * 读取完成之后进行做的操作
     * @param analysisContext
     */
    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}


